#!/bin/bash

# Explicitly set the path to your conda installation
CONDA_BASE_PATH="/opt/homebrew/anaconda3"
export PATH="$CONDA_BASE_PATH/bin:$PATH"

# Check if conda executable exists
if ! command -v conda &> /dev/null
then
    echo "Error: conda command not found. Please check the CONDA_BASE_PATH in this script."
    return 1
fi

# Initialize conda for the current shell session
eval "$(conda shell.bash hook)"

# Activate the conda environment
conda activate p2501_planning_agent

# Check if activation was successful
if [ "$?" -ne 0 ]; then
    echo "Error: Failed to activate conda environment 'p2501_planning_agent'."
    return 1
fi

echo "--- Conda environment 'p2501_planning_agent' activated successfully." 